home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
Lengths
/
l-alignment2
next >
Wrap
Lisp/Scheme
|
1998-10-22
|
1KB
|
52 lines
l-alignment2 lengths &key (type 'rest)
(rep nil)
legal types: 'rest 'note 'rep
legal rep t nil
this function is an extended version of
(excellent module) MRAC: l-alignment
since I often like the zones to be in control over
lengths here you can cut of lengths so that new length-lists
will start exactly on new zones.
(setq le '(1/8 1/4 1/4 1/1 1/4 1/16 1/16))
(setq zo '(1/8 1/4 1/4 1/1 1/4 1/64))
(l-alignment2 le zo :type 'rest)
->(1/8 1/4 1/4 1/1 1/4 -1/64)
(setq zo '(1/8 1/4 1/4 1/1 1/4 1/16 1/16 1/1))
(l-alignment2 le zo)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 -1/1)
(l-alignment2 le zo :type 'rest)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 -1/1)
(l-alignment2 le zo :type 'note)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 1/1)
(l-alignment2 le zo :type 'rep)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 1/8 1/4 1/4 -3/8)
In this new faster version
I added rep (repeat as a separate keyword) so that
you can still choose between note and rest when using
rep.
It is still compatible with earlier version so you don't
have to change anything.
(l-alignment2 le zo :type 'note :rep t)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 1/8 1/4 1/4 3/8)
(l-alignment2 le zo :type 'rest :rep t)
->(1/8 1/4 1/4 1/1 1/4 1/16 1/16 1/8 1/4 1/4 -3/8)
same as:
(l-alignment2 le zo :type 'rep)